package com.hoshiibuy.customerOperation.feign.fallback;

import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.hoshiibuy.customerOperation.feign.IdGeneratorService;

import lombok.extern.slf4j.Slf4j;

/**
 * @author Mr.Wu
 * @title: HystrixIdGeneratorFeignTestFallback
 * @projectName hoshiibuy-customerOperation
 * @description:HystrixIdGeneratorFeignTestFallback 测试用熔断处理
 * @since 2019-04-28
 */
@Slf4j
@Component
public class HystrixIdGeneratorFeignTestFallback implements IdGeneratorService {
	@Override
	public String queryGeneratorId() {
		log.warn("id服务触发fallback,使用本地雪花算法");
		return IdWorker.getIdStr();
	}
}
